/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import type.CustomerType;

/**
 *
 * @author edd
 */
@Entity (name = "PriceList")
public class PriceListEntity extends DataObjectEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    
    private CustomerType type;
    private long tieredQuantity;
    private double price;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date validity;
    
    @OneToOne
    private ProductEntity product;
    
    public PriceListEntity() {
        super();
    }

    public CustomerType getType() {
        return type;
    }

    public void setType(CustomerType type) {
        this.type = type;
    }

    public ProductEntity getProduct() {
        return product;
    }

    public void setProduct(ProductEntity product) {
        this.product = product;
    }

    @Override
    public String childToString() {
        return "PriceListEntity{" + "type=" + type + ", product=" + product + "}";
    }

    public long getTieredQuantity() {
        return tieredQuantity;
    }

    public void setTieredQuantity(long tieredQuantity) {
        this.tieredQuantity = tieredQuantity;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Date getValidity() {
        return validity;
    }

    public void setValidity(Date validity) {
        this.validity = validity;
    }
 
}
